package com.qf.business.extentions;

import com.qf.pojo.User;

public class UserInfoUtil {

    public static ThreadLocal<User> userThreadLocal = new ThreadLocal<>();

    /**
     * 存用户信息
     * @param user
     */
    public static void putUserInfo(User user) {
        userThreadLocal.set(user);
    }

    /**
     * 取用户信息
     * @return
     */
    public static User getUserInfo() {
        return userThreadLocal.get();
    }
}
